#pragma once

#include "ApproachTrace.h"
#include "AsteroidOrbitParam.h"
#include <boost/thread/thread.hpp>

typedef map<CAsteroidOrbitParam::Ptr, CApproachTrace::Ptr>	MapTraceApproaches;

class CApproachHolder: public IApproachHolder
{
public:
	CApproachHolder(void);
	virtual ~CApproachHolder(void);

	bool StoreToFile(LPCTSTR stzFileName);

	bool AppendTraceApproaches(CApproachTrace::Ptr listApprc);
	bool GetApproachesInRange(const CGridParam &ranges, ListPtrApproachs &ListOut);
protected:
	boost::mutex		m_mtxMap;
	MapTraceApproaches	m_mapTraceApproaches;
};
